
#include "Maths.h"
#include "OpenGLRenderer.h"

class C2DCamera
{
    
public:
    
    C2DCamera();
    
    void update();
    
    void setPos(Vector vPos)            { m_vPos = vPos; m_vDesiredPos = vPos; }
    void moveTo(Vector vPos)            { m_vDesiredPos = vPos; }
    void moveBy(Vector vPos)            { m_vDesiredPos = m_vPos + vPos; }
    void setAngle(Scalar fAngle)        { m_fAngle = fAngle; m_fDesiredAngle = fAngle; }
    void rotateTo(Scalar fAngle)        { m_fDesiredAngle = fAngle; }
    void rotateBy(Scalar fAngle)        { m_fDesiredAngle = m_fAngle + fAngle; }
    void setZoom(Scalar fZoom)          { m_fZoom = fZoom; m_fDesiredZoom = fZoom; }
    void zoomTo(Scalar fZoom)           { m_fDesiredZoom = fZoom; }
    void zoomBy(Scalar fZoom)           { m_fDesiredZoom = m_fZoom + fZoom; }
    
    Vector getPos()             { return m_vPos; }
    Scalar getAngle()           { return m_fAngle; }
    Scalar getZoom()            { return m_fZoom; }
    
private:
    
    Vector m_vPos;
    Scalar m_fAngle;
    Scalar m_fZoom;
    
    Vector m_vDesiredPos;
    Scalar m_fDesiredAngle;
    Scalar m_fDesiredZoom;
    
};
